import { MyRequest } from '..'

import type {
  amountListRoot,
  categoryCountRoot,
  categorySaleRoot,
  favorRoot,
  addressSaleRoot
} from '@/types/analysis'

export function getAmountListData() {
  return MyRequest.get<amountListRoot>({
    url: 'goods/amount/list'
  })
}

export function getGoodsCategoryCount() {
  return MyRequest.get<categoryCountRoot>({
    url: '/goods/category/count'
  })
}
export function getGoodsCategorySale() {
  return MyRequest.get<categorySaleRoot>({
    url: '/goods/category/sale'
  })
}

export function getGoodsCategoryFavor() {
  return MyRequest.get<favorRoot>({
    url: '/goods/category/favor'
  })
}

export function getGoodsAddressSale() {
  return MyRequest.get<addressSaleRoot>({
    url: '/goods/address/sale'
  })
}
